#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

int main()
{
    int m = 0;
    scanf("%d", &m);
    int m0 = m % 10;
    int m1 = m / 10 % 10;
    int m2 = m / 10 / 10;
    printf("%d %d %d\n", m0, m1, m2);

    return 0;
}